{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport RcCheckbox from 'rc-checkbox';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { FormItemInputContext } from '../form/context';\nimport warning from '../_util/warning';\nimport { GroupContext } from './Group';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport useStyle from './style';\nconst InternalCheckbox = (_a, ref) => {\n  var _b;\n  var {\n      prefixCls: customizePrefixCls,\n      className,\n      children,\n      indeterminate = false,\n      style,\n      onMouseEnter,\n      onMouseLeave,\n      skipGroup = false,\n      disabled\n    } = _a,\n    restProps = __rest(_a, [\"prefixCls\", \"className\", \"children\", \"indeterminate\", \"style\", \"onMouseEnter\", \"onMouseLeave\", \"skipGroup\", \"disabled\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const checkboxGroup = React.useContext(GroupContext);\n  const {\n    isFormItemInput\n  } = React.useContext(FormItemInputContext);\n  const contextDisabled = React.useContext(DisabledContext);\n  const mergedDisabled = (_b = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _b !== void 0 ? _b : contextDisabled;\n  const prevValue = React.useRef(restProps.value);\n  React.useEffect(() => {\n    checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);\n    process.env.NODE_ENV !== \"production\" ? warning('checked' in restProps || !!checkboxGroup || !('value' in restProps), 'Checkbox', '`value` is not a valid prop, do you mean `checked`?') : void 0;\n  }, []);\n  React.useEffect(() => {\n    if (skipGroup) {\n      return;\n    }\n    if (restProps.value !== prevValue.current) {\n      checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current);\n      checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);\n      prevValue.current = restProps.value;\n    }\n    return () => checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value);\n  }, [restProps.value]);\n  const prefixCls = getPrefixCls('checkbox', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const checkboxProps = Object.assign({}, restProps);\n  if (checkboxGroup && !skipGroup) {\n    checkboxProps.onChange = function () {\n      if (restProps.onChange) {\n        restProps.onChange.apply(restProps, arguments);\n      }\n      if (checkboxGroup.toggleOption) {\n        checkboxGroup.toggleOption({\n          label: children,\n          value: restProps.value\n        });\n      }\n    };\n    checkboxProps.name = checkboxGroup.name;\n    checkboxProps.checked = checkboxGroup.value.includes(restProps.value);\n  }\n  const classString = classNames({\n    [`${prefixCls}-wrapper`]: true,\n    [`${prefixCls}-rtl`]: direction === 'rtl',\n    [`${prefixCls}-wrapper-checked`]: checkboxProps.checked,\n    [`${prefixCls}-wrapper-disabled`]: mergedDisabled,\n    [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput\n  }, className, hashId);\n  const checkboxClass = classNames({\n    [`${prefixCls}-indeterminate`]: indeterminate\n  }, hashId);\n  const ariaChecked = indeterminate ? 'mixed' : undefined;\n  return wrapSSR( /*#__PURE__*/\n  // eslint-disable-next-line jsx-a11y/label-has-associated-control\n  React.createElement(\"label\", {\n    className: classString,\n    style: style,\n    onMouseEnter: onMouseEnter,\n    onMouseLeave: onMouseLeave\n  }, /*#__PURE__*/React.createElement(RcCheckbox, Object.assign({\n    \"aria-checked\": ariaChecked\n  }, checkboxProps, {\n    prefixCls: prefixCls,\n    className: checkboxClass,\n    disabled: mergedDisabled,\n    ref: ref\n  })), children !== undefined && /*#__PURE__*/React.createElement(\"span\", null, children)));\n};\nconst Checkbox = /*#__PURE__*/React.forwardRef(InternalCheckbox);\nif (process.env.NODE_ENV !== 'production') {\n  Checkbox.displayName = 'Checkbox';\n}\nexport default Checkbox;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","classNames","RcCheckbox","React","ConfigContext","FormItemInputContext","warning","GroupContext","DisabledContext","useStyle","InternalCheckbox","_a","ref","_b","prefixCls","customizePrefixCls","className","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled","restProps","getPrefixCls","direction","useContext","checkboxGroup","isFormItemInput","contextDisabled","mergedDisabled","prevValue","useRef","value","useEffect","registerValue","process","env","NODE_ENV","current","cancelValue","wrapSSR","hashId","checkboxProps","assign","onChange","apply","arguments","toggleOption","label","name","checked","includes","classString","checkboxClass","ariaChecked","undefined","createElement","Checkbox","forwardRef","displayName"],"sources":["/data/messenger.client/node_modules/antd/es/checkbox/Checkbox.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport classNames from 'classnames';\nimport RcCheckbox from 'rc-checkbox';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport { FormItemInputContext } from '../form/context';\nimport warning from '../_util/warning';\nimport { GroupContext } from './Group';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport useStyle from './style';\nconst InternalCheckbox = (_a, ref) => {\n  var _b;\n  var {\n      prefixCls: customizePrefixCls,\n      className,\n      children,\n      indeterminate = false,\n      style,\n      onMouseEnter,\n      onMouseLeave,\n      skipGroup = false,\n      disabled\n    } = _a,\n    restProps = __rest(_a, [\"prefixCls\", \"className\", \"children\", \"indeterminate\", \"style\", \"onMouseEnter\", \"onMouseLeave\", \"skipGroup\", \"disabled\"]);\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const checkboxGroup = React.useContext(GroupContext);\n  const {\n    isFormItemInput\n  } = React.useContext(FormItemInputContext);\n  const contextDisabled = React.useContext(DisabledContext);\n  const mergedDisabled = (_b = (checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.disabled) || disabled) !== null && _b !== void 0 ? _b : contextDisabled;\n  const prevValue = React.useRef(restProps.value);\n  React.useEffect(() => {\n    checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);\n    process.env.NODE_ENV !== \"production\" ? warning('checked' in restProps || !!checkboxGroup || !('value' in restProps), 'Checkbox', '`value` is not a valid prop, do you mean `checked`?') : void 0;\n  }, []);\n  React.useEffect(() => {\n    if (skipGroup) {\n      return;\n    }\n    if (restProps.value !== prevValue.current) {\n      checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(prevValue.current);\n      checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.registerValue(restProps.value);\n      prevValue.current = restProps.value;\n    }\n    return () => checkboxGroup === null || checkboxGroup === void 0 ? void 0 : checkboxGroup.cancelValue(restProps.value);\n  }, [restProps.value]);\n  const prefixCls = getPrefixCls('checkbox', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const checkboxProps = Object.assign({}, restProps);\n  if (checkboxGroup && !skipGroup) {\n    checkboxProps.onChange = function () {\n      if (restProps.onChange) {\n        restProps.onChange.apply(restProps, arguments);\n      }\n      if (checkboxGroup.toggleOption) {\n        checkboxGroup.toggleOption({\n          label: children,\n          value: restProps.value\n        });\n      }\n    };\n    checkboxProps.name = checkboxGroup.name;\n    checkboxProps.checked = checkboxGroup.value.includes(restProps.value);\n  }\n  const classString = classNames({\n    [`${prefixCls}-wrapper`]: true,\n    [`${prefixCls}-rtl`]: direction === 'rtl',\n    [`${prefixCls}-wrapper-checked`]: checkboxProps.checked,\n    [`${prefixCls}-wrapper-disabled`]: mergedDisabled,\n    [`${prefixCls}-wrapper-in-form-item`]: isFormItemInput\n  }, className, hashId);\n  const checkboxClass = classNames({\n    [`${prefixCls}-indeterminate`]: indeterminate\n  }, hashId);\n  const ariaChecked = indeterminate ? 'mixed' : undefined;\n  return wrapSSR(\n  /*#__PURE__*/\n  // eslint-disable-next-line jsx-a11y/label-has-associated-control\n  React.createElement(\"label\", {\n    className: classString,\n    style: style,\n    onMouseEnter: onMouseEnter,\n    onMouseLeave: onMouseLeave\n  }, /*#__PURE__*/React.createElement(RcCheckbox, Object.assign({\n    \"aria-checked\": ariaChecked\n  }, checkboxProps, {\n    prefixCls: prefixCls,\n    className: checkboxClass,\n    disabled: mergedDisabled,\n    ref: ref\n  })), children !== undefined && /*#__PURE__*/React.createElement(\"span\", null, children)));\n};\nconst Checkbox = /*#__PURE__*/React.forwardRef(InternalCheckbox);\nif (process.env.NODE_ENV !== 'production') {\n  Checkbox.displayName = 'Checkbox';\n}\nexport default Checkbox;"],"mappings":"AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG,CAAC,CAAC,IAAIF,CAAC,CAACO,OAAO,CAACL,CAAC,CAAC,GAAG,CAAC,EAAED,CAAC,CAACC,CAAC,CAAC,GAAGH,CAAC,CAACG,CAAC,CAAC;EAChG,IAAIH,CAAC,IAAI,IAAI,IAAI,OAAOI,MAAM,CAACK,qBAAqB,KAAK,UAAU,EAAE,KAAK,IAAIC,CAAC,GA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